package com.day19.Copy;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class CopyFileDemo02 {
    public static void main(String[] args) {

    }
    private static void method3(){
        try(FileReader fr=new FileReader("fr.txt");
            FileWriter fw=new FileWriter("fw.txt")) {
            char[] chs=new char[1024];
            int len;
            while((len=fr.read(chs))!=-1){
                fw.write(chs,0,len);
            }
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
